//
//  MineViewController.m
//  Hello
//
//  Created by Detailscool on 16/3/17.
//  Copyright © 2016年 Detailscool. All rights reserved.
//

#import "MineViewController.h"

#import "ActivityViewController.h"
#import "CollectionRecordViewController.h"
#import "LoveMarketViewController.h"
#import "PersonalSettingViewController.h"
#import "ProfileViewController.h"
#import "SettingViewController.h"

@implementation MineViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self setupBasic];
    
    [self setupTableView];
    
}

- (void)setupBasic {
    
    self.view.backgroundColor = GlobalColor;
    
    UIView * profileView = [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetHeight(self.navigationController.navigationBar.frame), CGRectGetWidth(self.navigationController.navigationBar.frame), ProfileViewH)];;
    [self.navigationController.navigationBar addSubview:profileView];
    profileView.backgroundColor = ThemeColor;
    
    self.tableView.contentInset = UIEdgeInsetsMake(ProfileViewH, 0, 0, 0);

}

- (void)setupTableView {
    
    SettingModel * model00 = [SettingModel settingModelWithImageName:@"personal_profile" title:@"个人资料" destinationViewController:[ProfileViewController class]];
    SettingModel * model01 = [SettingModel settingModelWithImageName:@"activity" title:@"参加的活动" destinationViewController:[ProfileViewController class]];
    SettingGroup * group0 = [SettingGroup settingGroupWithModel:@[model00,model01]];
    
    SettingModel * model10 = [SettingModel settingModelWithImageName:@"record" title:@"快递代收记录" destinationViewController:[CollectionRecordViewController class]];
    SettingModel * model11 = [SettingModel settingModelWithImageName:@"collection_setting" title:@"代收个性设置" destinationViewController:[PersonalSettingViewController class]];
    SettingGroup * group1 = [SettingGroup settingGroupWithModel:@[model10,model11]];
    
    SettingModel * model20 = [SettingModel settingModelWithImageName:@"love_market" title:@"爱心商城" destinationViewController:[LoveMarketViewController class]];
    SettingGroup * group2 = [SettingGroup settingGroupWithModel:@[model20]];
    
    SettingModel * model30 = [SettingModel settingModelWithImageName:@"setting" title:@"设置" destinationViewController:[SettingViewController class]];
    SettingGroup * group3 = [SettingGroup settingGroupWithModel:@[model30]];
    
    self.groups = [NSMutableArray arrayWithObjects:group0,group1,group2,group3, nil];
    
}




@end
